package com.test.group6.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.test.group6.domain.WorkesInformation;
import com.test.group6.service.WorkesSelectService;

@RestController
@RequestMapping("/WorkesSelectController")
public class WorkesSelectController {
	
	@Autowired
	private WorkesSelectService workesSelectService;
	
	/**
	 * @author zhang_sguang
	 * @param enterpriseId 第一个参数 企业编号；index 第二个参数 分页展示的页号
	 * @return {@link List<WorkesInformation>}
	 */
	@RequestMapping("/queryAllWorkerControl")
	public List<WorkesInformation> queryAllWorkerControl(String enterpriseId, Integer index) {
		List<WorkesInformation> list = workesSelectService.queryAllWorker(enterpriseId, index);
		return list;
	}
	/**
	 * @author zhang_sguang
	 * @param 无参数
	 * @return {@link Integer}
	 */
	@RequestMapping("/queryCount")
	public Integer queryCount() {
		return workesSelectService.queryCount();
	}
}
